/**
 * Site Header
 */
.site-header {
  border-bottom: 1px solid _palette(charcoal-light-75);
  padding-bottom: 1em;
  padding-top: 1em;

  .palette-dark & {
    border-bottom-color: _palette(charcoal-light-7);
  }
}

.site-header-inside {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.site-branding {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;

  a {
    border: 0;
    color: inherit !important;
  }
}

.site-logo {
  margin: 0;

  img {
    max-height: 2.5em;
  }
}

.site-title {
  color: #fff;
  font-size: 1.22222em;
  font-weight: bold;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;

  a {
    background: _palette(accent);
    display: inline-block;
    padding: 0.2em 0.45em;

    .accent-green & {
      background: _palette(accent-green);
    }
  
    .accent-blue & {
      background: _palette(accent-blue);
    }
  
    .accent-violet & {
      background: _palette(accent-violet);
    }
  
    .accent-yellow & {
      background: _palette(accent-yellow);
    }
  }
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  font-size: 16px;
  line-height: 1.2;

  &.current-menu-item {
    color: _palette(accent);

    .accent-green & {
      color: _palette(accent-green);
    }
  
    .accent-blue & {
      color: _palette(accent-blue);
    }
  
    .accent-violet & {
      color: _palette(accent-violet);
    }
  
    .accent-yellow & {
      color: _palette(accent-yellow);
    }
  }

  a {
    &:not(.button) {
      border: 0;
      color: inherit;

      &:hover {
        color: _palette(accent);

        .accent-green & {
          color: _palette(accent-green);
        }
      
        .accent-blue & {
          color: _palette(accent-blue);
        }
      
        .accent-violet & {
          color: _palette(accent-violet);
        }
      
        .accent-yellow & {
          color: _palette(accent-yellow);
        }
      }
    }
  }
}

#menu-open,
#menu-close {
  background: 0;
  border: 0;
  color: inherit;
  height: 30px;
  padding: 0;
  position: relative;
  width: 30px;

  &:hover,
  &:focus,
  &:active {
    outline: 0;
  }
}

@media only screen and (min-width: 801px) {
  .menu-toggle {
    display: none;
  }

  .site-navigation {
    margin-left: auto;
  }

  .menu {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }

  .menu-item {
    margin-left: 25px;

    .button {
      padding: 0.275em 0.5em;
    }
  }
}

@media only screen and (max-width: 800px) {
  .site-header {
    &:after {
      background: rgba(_palette(charcoal),.6);
      content: "";
      height: 100vh;
      left: 0;
      opacity: 0;
      position: absolute;
      top: 0;
      -webkit-transition: opacity .25s, visibility 0s .25s;
      transition: opacity .25s, visibility 0s .25s;
      visibility: hidden;
      width: 100%;
      z-index: 998;

      .palette-dark & {
        background: rgba(_palette(charcoal-dark-15),.6);
      }
    }
  }

  #menu-open {
    display: block;
    margin-left: auto;
  }

  .site-navigation {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background-color: #fff;
    box-sizing: border-box;
    bottom: 0;
    margin: 0;
    max-width: 360px;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    right: -100%;
    top: 0;
    -webkit-transition: right .3s cubic-bezier(.65,.05,.36,1), visibility 0s .3s;
    transition: right .3s cubic-bezier(.65,.05,.36,1), visibility 0s .3s;
    visibility: hidden;
    width: 100%;
    z-index: 999;

    .palette-dark & {
      background:_palette(charcoal);
    }
  }

  .site-nav-inside {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }

  #menu-close {
    display: block;
    position: absolute;
    right: 3vw;
    top: 1rem;
  }

  .menu {
    padding: calc(2em + 30px) 3vw 3.33333em;
  }

  .menu-item {
    border-top: 1px solid _palette(charcoal-light-75);
    display: block;

    .palette-dark & {
      border-top-color: _palette(charcoal-light-7);
    }

    &:not(.menu-button):last-child {
      border-bottom: 1px solid _palette(charcoal-light-75);

      .palette-dark & {
        border-bottom-color: _palette(charcoal-light-7);
      }
    }

    a {
      display: block;

      &:not(.button) {
        padding: 0.75em 0;
      }
    }
  }

  .menu-button {
    padding: 1em 0;

    & + .menu-button {
      border-top: 0;
      padding-top: 0;
    }

    .button {
      padding-left: 0.5em;
      padding-right: 0.5em;
    }
  }

  .menu--opened {
    overflow: hidden;

    .site-header {
      &:after {
        opacity: 1;
        -webkit-transition: opacity .25s;
        transition: opacity .25s;
        visibility: visible;
      }
    }

    .site-navigation {
      right: 0;
      -webkit-transition: right .3s ease;
      transition: right .3s ease;
      visibility: visible;
    }
  }
}
